<?php
namespace app\admin\controller;
use think\Controller;
use think\Db;

class Base extends Controller
{
    public function _initialize(){
        if(!session('username')){
            $this->error('请先登录系统！','Login/index');
        }
        $config = Db::name('system')
        	->where(array('id'=>1))
        	->find();
        $this->assign('config',$config);
    }
}
